# -*- coding: utf-8 -*-
class BaseConfig:
    # session的盐
    SECRET_KEY = "0f4323ad28a271fb5dbf8fc40246cfda"
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    DEBUG = True


class DevelopmentConfig(BaseConfig):
    # 数据库配置信息
    # MySQL所在的主机名
    # 写服务器
    HOSTNAME = "hadoop105"
    # 本地
    # HOSTNAME = "localhost"
    # MySQL监听的端口号，默认3306
    PORT = 3306
    # 连接MySQL的用户名，读者用自己设置的
    USERNAME = "root"
    # 连接MySQL的密码，读者用自己的
    PASSWORD = ""
    # PASSWORD = "_Txl52020"
    # MySQL上创建的数据库名称
    DATABASE = "recommend"
    DB_URI = f"mysql+pymysql://{USERNAME}:{PASSWORD}@{HOSTNAME}:{PORT}/{DATABASE}?charset=utf8mb4"
    SQLALCHEMY_DATABASE_URI = DB_URI

    # Redis配置
    redis_host = "hadoop105"
    redis_port = 6380

    # Kafka配置
    bootstrap_servers = "hadoop103:9092"
    group_id = "recommender_consumer"
